package com.dabai.iot.core.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 设备日志查询
 *
 * @author kev1n
 */
@Data
public class DevicePropertyQuery implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 设备id
     */
    @Schema(description = "设备id")
    @NotNull
    private Long deviceId;

    /**
     * 属性id
     */
    @Schema(description = "属性id")
    private Long itemId;

    /**
     * 查询时间起
     */
    @Schema(description = "查询时间起")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date queryStartTime;

    /**
     * 查询时间止
     */
    @Schema(description = "查询时间止")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date queryEndTime;

}
